{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "46c7a016-e9e3-4e40-bb39-794070755ff9",
   "metadata": {},
   "source": [
    "# 读书笔记"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "62b57b31-54f4-4bbc-83d4-0fa9de401bcf",
   "metadata": {},
   "source": [
    "## 第一部分\n",
    "### 阅读的目的\n",
    "\n",
    "1. 寻找到其中的自学办法\n",
    "2. 磨性子"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1c0530f2-6832-43c5-b4f9-718fb5597370",
   "metadata": {},
   "source": [
    "\n",
    "### [前言](../00.cover.ipynb) \n",
    "\n",
    "```bash\n",
    "如何学的好 ::= 焦虑没有用 & 积累\n",
    "自学 ::= [熟能生巧 | Practice makes perfect] {自学这事只能相信老生长谈}\n",
    "```\n",
    "> - 推荐看的书\n",
    ">> - 《李笑来的写作课》\n",
    ">> - 《把时间当作朋友》\n",
    ">> - 《通往财富自由之路》\n",
    ">> -《韭菜的自我修养》\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "77d0aa78-f3e5-443c-99c1-46e7e1f9954c",
   "metadata": {},
   "source": [
    "### [如何证明你读过这本书](../02.proof-of-work.ipynb)\n",
    "\n",
    "```bash\n",
    "本章概述 ::= (工作证明 | Git)\n",
    "...~\n",
    "工作证明 ::= (`确保自己有工作过`){Git}\n",
    "Git ::= <bash>(教程 | 基本抽象 | 工作逻辑){Gitlab | bitbucket}\n",
    "基本抽象 ::= (工作区 | 临时缓存区 | 本地仓库 | 云端仓库)\n",
    "```\n",
    "\n",
    "> - Git教程\n",
    ">> - 核心教程：[《Pro git》]((https://git-scm.com/book/en/v2)\n",
    ">> - 内部教程：[《Git介绍》](../T-appendix.git-introduction.ipynb)\n",
    "> - Git的支持工具\n",
    ">> - Gitlab: https://about.gitlab.com/\n",
    ">> - bitbucket: https://bitbucket.org/"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6e89f7f2-9a92-4874-952c-9323e7c452f0",
   "metadata": {},
   "source": [
    "### [自学能力](../Part.1.A.better.teachyourself.ipynb)\n",
    "\n",
    "```bash\n",
    "本章概述 ::= (自学能力 | 时间幻觉)\n",
    "...~\n",
    "自学能力 ::= (阅读能力 & 熟能生巧 & 耐心){自学需要的一切都很朴素}\n",
    "时间幻觉 ::= 时间你不用它也会溜走{时间永远匀速流动}\n",
    "...\n",
    "有趣的统计 ::= (人类寿命 | 人类发展指数)\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "43882c74-8d70-4e09-9cf1-a71b6c4eeb0a",
   "metadata": {},
   "source": [
    "### [为什么从编程入手](../Part.1.B.why.start.from.learning.coding.ipynb)\n",
    "```bash\n",
    "重要的例子 ::= 有趣的例子使人深刻{从多个例子中挑出那个精彩优秀的}\n",
    "自学能力 ::= 通过编程学习进行展示\n",
    "文盲的进程 ::= 识字 -> 英语 -> 编程 -> 数据分析\n",
    "编程学习 ::= (非线性结构知识 | 阅读官方文档)\n",
    "非线性结构知识 ::= (过早引用{Forward References}){}\n",
    "过早引用\n",
    "阅读建议 ::= (人人都能用英语)\n",
    "\n",
    "```\n",
    "> - [《人人都能用英语》](https://github.com/xiaolai/everyone-can-use-english)\n",
    "> - python文档制作工具: https://www.sphinx-doc.org/en/master/\n",
    "> - 过早引用：https://en.wikipedia.org/wiki/Forward_declaration"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "92012ced-7664-4402-b4fd-43a5d0a4f67a",
   "metadata": {},
   "source": [
    "### [只靠阅读习得](../Part.1.C.must.learn.sth.only.by.reading.ipynb)\n",
    "\n",
    "```sh\n",
    "本章概述 ::= (阅读 | 英语)\n",
    "阅读 ::= (错误认知)\n",
    "错误认知 ::= (!:`不是什么东西都可以从书本里学到的……`){`读的不够多、读的不对`}\n",
    "英语 ::= 大杂烩 | Wikipedia\n",
    "```\n",
    "> - 李笑来推荐 \n",
    ">> - 张纯如\n",
    ">> - 郑念: Life and Death in Shanghai\n",
    ">> - 费正清: The Cambridge History of China\n",
    ">> - 连阔如:《江湖丛谈》"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b169e6bb-b44e-4829-93de-5fe94ea24d1d",
   "metadata": {},
   "source": [
    "### [如何应对过早引用](../Part.1.F.deal-with-forward-references.ipynb)\n",
    "```bash\n",
    "文章梗概 ::= (过早引用 | 应对方式)\n",
    "...\n",
    "过早引用 ::= 知识中暂时无法理解的知识群 {过早引用无处不在&必定存在{'太早的接触过于复杂的东西会让大多数人心生退意'}}\n",
    "应对方式 ::= (\n",
    "`读不懂也有读完` \n",
    "| `磨练只字不差的技巧` \n",
    "| `不明白先记下来` {'记忆'}\n",
    "| `先关注使用再研究原理` \n",
    "| `尊重前人的总结和建议`\n",
    ")+ {`重复理解`}\n",
    "\n",
    "读不懂也要读完 ::= <检视阅读>{囫囵吞枣} (目录 | 术语表 | 索引 | 参考文献) --> `为探索未知领域先画个潦草的地图`\n",
    "磨练只字不差的技巧 ::= <理解>(字 | 词)+含义\n",
    "不明白先记下来 ::= <笔记 & 整理*> {好记性不如烂笔头}\n",
    "整理* ::= <总结 & 归纳 & 整理 & 组织>(* | 善用图表 {`列表、示意图、表格`})\n",
    "尊重前人的总结和建议 ::= {`尊重前人的总结和建议` | `等你长大了就懂了……`}\n",
    "先关注使用再研究原理 ::= 我们原本就很擅长使用自己还未理解的事物 & 不要害怕犯错\n",
    "```\n",
    "\n",
    "> - 过早引用: [Forward References](https://en.wikipedia.org/wiki/Forward_declaration#id=Forward_reference)\n",
    "> - 哪些一边看不懂的电影\n",
    ">> - Quentin Tarantino 导演的 [Pulp Fiction (1994)](https://www.imdb.com/title/tt0110912/)\n",
    ">> - David Fincher 导演的 [Fight Club (1999)](https://www.imdb.com/title/tt0137523/)\n",
    ">> - Christopher Nolan 导演的 [Inception (2010)](https://www.imdb.com/title/tt1375666/)\n",
    ">> - Martin Scorsese 导演的 [Shutter Island (2010)](https://www.imdb.com/title/tt1130884/)\n",
    "> - python的作者: [Guido van Rossum](https://en.wikipedia.org/wiki/Guido_van_Rossum)\n",
    "> - 善于学习的例子：https://nvie.com/posts/iterators-vs-generators/\n",
    "> - 冥想：[Meditation](https://en.wikipedia.org/wiki/Meditation)\n",
    ">> * [Harvard neuroscientist: Meditation not only reduces stress, here's how it changes your brain](https://www.washingtonpost.com/news/inspired-life/wp/2015/05/26/harvard-neuroscientist-meditation-not-only-reduces-stress-it-literally-changes-your-brain/)\n",
    ">> * [This Is Your Brain on Meditation -- The science explaining why you should meditate every day](https://www.psychologytoday.com/us/blog/use-your-mind-change-your-brain/201305/is-your-brain-meditation)\n",
    ">> * [Researchers study how it seems to change the brain in depressed patients](https://news.harvard.edu/gazette/story/2018/04/harvard-researchers-study-how-mindfulness-may-change-the-brain-in-depressed-patients/)\n",
    ">> * [Meditation's Calming Effects Pinpointed in the Brain](https://www.scientificamerican.com/article/meditations-calming-effects-pinpointed-in-brain/)\n",
    ">> * [Different meditation types train distinct parts of your brain](https://www.newscientist.com/article/2149489-different-meditation-types-train-distinct-parts-of-your-brain/)\n",
    "> - Python中建议记住的规范和标准：https://www.python.org/dev/peps/pep-0008/\n",
    "> - 旧金山的奇闻异事：[Developer goes rogue, shoots four colleagues at ERP code maker](https://www.theregister.co.uk/2018/09/20/developer_work_shooting/)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "21edcf51-67f7-415f-b046-d1ae33790ee6",
   "metadata": {},
   "source": [
    "### [笨拙与耐心](../Part.2.A.clumsy-and-patience.ipynb)\n",
    "\n",
    "```bash\n",
    "本章概要 ::= (自学 & 心理建设)\n",
    "自学 ::= (`学` | `练` | `用` | `造`) {主要靠'时间'}\n",
    "学 ::= 学就是重复 {'不建议过早的练习'}\n",
    "练 ::= 以用带练\n",
    "心理建设 ::= {`会很费时`| `会重复很多次` | 预算观念}\n",
    "预算观念 ::= {`绝对不做预算不够的事情。`}\n",
    "\n",
    "```\n",
    "### [刻意练习](../Part.2.B.deliberate-practicing.ipynb)\n",
    "```bash\n",
    "本章概要 ::= (刻意练习 | 混)\n",
    "刻意练习 ::= (刻意思考 & 刻意练习)\n",
    "刻意思考 ::= 哪些是你应该练习的地方 {`建议记录在统一的地方` --> [iphone | 语雀] & `每个人需要刻意练习的地方都是不一样的`{`这还真是书本上学不到的`}}\n",
    "刻意练习 <> 混 ::= {'不做刻意练习的人就是在混时间。'}\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "df511961-6fa7-4936-8581-ee9510dc0ee1",
   "metadata": {},
   "source": [
    "### [刻意思考](../Part.2.E.deliberate-thinking.ipynb)\n",
    "```bash\n",
    "本章内容 ::= (能用在[还]哪? | 轻重缓急四项法)\n",
    "```\n",
    "> - 有意思的项目：[What exactly can you do with Python? ](https://medium.freecodecamp.org/what-can-you-do-with-python-the-3-main-applications-518db9a68a78)\n",
    "> - 开发方法论里的小东西：[MoSCoW Method](https://en.wikipedia.org/wiki/MoSCoW_method)\n",
    "> -《Case Method Fast-Track: A RAD Approach》作者：Clegg Dai"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "463c47de-0302-44bb-b25e-b642bf893a79",
   "metadata": {},
   "source": [
    "### [战胜难点](../Part.3.A.conquering-difficulties.ipynb)\n",
    "```bash\n",
    "本章概述 ::= (困难幻觉 | 自学要领 | 知识的本质 | 老话)\n",
    "...\n",
    "困难幻觉 ::= 在没有接触前会觉得很难或没必要{'学会拆解'}\n",
    "...\n",
    "自学要领 ::= (\n",
    "`不混时间，刻意思考，以及刻意练习`\n",
    "& `无论学什么都一样，难的部分不学会，就等于整个没学。` \n",
    "& `耐心和枯燥` {'习惯枯燥，因为它原本就是枯燥的。'})\n",
    "知识的本质 ::= 它没有任何义务去具备幽默生动的属性\n",
    "老话 ::= <拆解 & 突破>天下无难事，只怕有心人……\n",
    "...\n",
    "第三部分目录 ::= (\n",
    "`类，以及面向对象编程（Class，OOP）`\n",
    "| `迭代器、生成器、装饰器（Iterators、Generators、Decorators）`\n",
    "| `正则表达式（Regular Expressions）`\n",
    "| `巴科斯-诺尔范式（Backus Normal Form）`\n",
    ")\n",
    "```\n",
    "> - 那个 “突然”，其实就是阿基米德的[Eureka](https://en.wikipedia.org/wiki/Eureka_effect)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "399d6570-3202-4638-a65a-b4676b47dccc",
   "metadata": {},
   "source": [
    "### [自学技巧:拆解](../Part.3.C.breaking-good-and-bad.ipynb)\n",
    "```bash\n",
    "本章概述 ::= (横向拆解 | 纵向拆解 | 触类旁通 | 老人言)\n",
    "拆解 ::= 把那些很难的任务无限拆分 —— 直至每个子任务都很小，小到都可操作为止。\n",
    "{接触-->配置环境-->案例尝试-->精度学习-->拆解-->局部学习-->返回重组-->多维拆分-->归纳总结记忆}\n",
    "...\n",
    "横向拆解 ::= {同一知识之间的知识块}\n",
    "纵向拆解 ::= {解决不同知识之间的交叉问题}\n",
    "精度学习 ::= 官方文档学习\n",
    "触类旁通 ::= {`事先想不清楚的，就不要去做。`}\n",
    "...\n",
    "老人言 ::= 别怕麻烦\n",
    "老人言 ::= 原来很简单的东西竟然可能成为很多人一生的障碍。\n",
    "老人言 ::= 事先想不清楚的，就不要去做。\n",
    "```\n",
    "> - 《通往财富自由之路》讲解、厘清概念及其之间关系的重要性。\n",
    "> - [庄辰超](https://www.google.com/search?q=庄辰超)\n",
    "> - “小” 无所谓，“完整” 才是关键。"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c15e47f6-bde0-4128-9b1a-882737b9520a",
   "metadata": {},
   "source": [
    "### [刚需幻觉](../Part.3.D.indispensable-illusion.ipynb)\n",
    "```bash\n",
    "本章概述 ::= (感觉陷阱 | 时间幻觉 | 刚需幻觉 | 老人言)\n",
    "...~\n",
    "感觉陷阱 ::= `绝大多数人的自学能力，基本上都是被 “自己的感觉” 耽误掉的。`\n",
    "\n",
    "时间幻觉 ::= (...)<学会 : 1~2年 | 学好 : 3~5年 | 精通 : 一辈子 >\n",
    "\n",
    "刚需幻觉 ::= (概念 | 问题 | 优势策略){`只有真正掌握了那个技能之后，那个技能才会 “变” 成刚需。`}\n",
    "问题 ::= `你不会的东西，对你来说感觉上就不是刚需。`{'我根本离不开它 & 它其实真没多难……'}\n",
    "优势策略 ::= (明确因果 | 自我驱动)\n",
    "明确因果 ::= `对任何一项技能来说，刚需是自学的结果，而不是自学的原因。`\n",
    "自我驱动 ::= `做个自驱动的人，而非被外部驱动的被动的人。`{'找活干'}\n",
    "...\n",
    "自学策略 ::= 不要问学它有什么用，学就是了……\n",
    "Framing Effect : 无论如何都会用已有信息拼成一个完整图像的功能\n",
    "老人言 ::= 绝大多数人的自学能力，基本上都是被 “自己的感觉” 耽误掉的。\n",
    "模仿的局限 ::= 模仿必须依赖模仿对象，受自己的视野所限。| 模仿只能处理表里如一的简单知识和技能，难一点的知识就没有办法模仿了。\n",
    "结论 ::= 一切的技能都是刚需。\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a0563e20-d3e7-4754-a07d-6a79e238c7f7",
   "metadata": {},
   "source": [
    "### [自学境界：全面](../Part.3.E.to-be-thorough.ipynb)\n",
    "```bash\n",
    "本章概述 ::= (全面 | 自学建议)\n",
    "...~\n",
    "刻意全面 ::= 所谓的不混时间，无非就是刻意练习、追求全面\n",
    "全面的方法 ::= 教是最好的学习方法。\n",
    "学好的方式 ::= 多读几本书。狠一点，就是多读很多本书。\n",
    "...\n",
    "自学建议 ::= 绝对不能只靠一本书\n",
    "自学建议 ::= 尽快开始整理归纳总结 {一定要自己做}\n",
    "...\n",
    "学习建议 ::= 有同学问，你就一定要耐心讲讲 —— 对自己有好处。\n",
    "```\n",
    "> - 更多的书\n",
    ">> - [Think Python](http://greenteapress.com/wp/think-python-2e/)\n",
    ">> - [A Bite of Python](https://python.swaroopch.com/)\n",
    ">> - [Dive into Python](https://linux.die.net/diveintopython/html/)\n",
    "> - 教学相长：许嘉璐先生有一本书，《未央续集》\n",
    "> - <a name='fn1'>[1]</a>：一点八卦：Dive into Python 的作者是 [Mark Pilgrim](https://en.wikipedia.org/wiki/Mark_Pilgrim)；他是互联网上最著名的自绝于信息世界（[infosuicide](https://www.urbandictionary.com/define.php?term=infosuicide)）的三人之一。另外两位分别是比特币的作者 [Satoshi Nakamoto](https://en.wikipedia.org/wiki/Satoshi_Nakamoto)，和 [Why the lucky stiff](https://whytheluckystiff.net/) 的作者 [Jonathan Gillette](https://en.wikipedia.org/wiki/Why_the_lucky_stiff)。\n",
    "> - <a name='fn2'>[2]</a>：许嘉璐，1998 年至 2000 年全国人大常委会副委员长，民进中央主席，国家语言文字工作委员会主任。\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a2006b2a-3618-4b6c-b33f-75d7c0cd0997",
   "metadata": {},
   "source": [
    "### [自学社交](../Part.3.F.social-selfteaching.ipynb)\n",
    "```bash\n",
    "本章概述 ::= (社交 | 自学)\n",
    "...~\n",
    "社交 ::= (原则 | 选择 | 沟通 | 核心)\n",
    "原则 ::= 用作品社交 | 想尽一切办法见识拥有那个技能的，令他产生羡慕情绪的人，激发自学的动能。\n",
    "选择 ::= 选择哪些自学能力强的圈子\n",
    "沟通 ::= 简单朴实\n",
    "核心 ::= 模仿{镜像神经元}\n",
    "...\n",
    "自学的要点 ::= 无论学什么，都要想尽一切办法尽快做出自己的'作品'\n",
    "自学的基本素养 ::= (学就学得全面 & 做就做得完整)\n",
    "作品的用处 ::= 发现之前看起来并不相干的知识与技能的重要性\n",
    "全面的建议 ::= 手艺人不怕做的事小。而且，“小” 无所谓，“完整” 才是关键。\n",
    "...\n",
    "时间预算 --> 耐心练习 --> 不断找活干 --> 完成完整的作品\n",
    "```\n",
    "\n",
    "> - Samuel H. Altman的文章《[Advice for ambitious 19 year olds](https://blog.samaltman.com/advice-for-ambitious-19-year-olds)\n",
    "> 顺带给你看个 Wikipedia 上的链接列表，在编程领域里，有无数可以借鉴到生活中的哲学、方法论：\n",
    ">> - [If it ain't broke, don't fix it](https://en.wikipedia.org/wiki/If_it_ain%27t_broke,_don%27t_fix_it)\n",
    ">> - [KISS principle](https://en.wikipedia.org/wiki/KISS_principle)\n",
    ">> - [Don't repeat yourself](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself)\n",
    ">> - [Feature creep](https://en.wikipedia.org/wiki/Feature_creep)\n",
    ">> - [List of software development philosophies](https://en.wikipedia.org/wiki/List_of_software_development_philosophies)\n",
    ">> - [Minimum viable product](https://en.wikipedia.org/wiki/Minimum_viable_product)\n",
    ">> - [MoSCoW method](https://en.wikipedia.org/wiki/MoSCoW_method)\n",
    ">> - [Overengineering](https://en.wikipedia.org/wiki/Overengineering)\n",
    ">> - [Worse is better](https://en.wikipedia.org/wiki/Worse_is_better)\n",
    ">> - [S.O.L.I.D.](https://en.wikipedia.org/wiki/SOLID)\n",
    ">> - [Unix philosophy](https://en.wikipedia.org/wiki/Unix_philosophy)\n",
    "> - 美丽的专利：<a name='fn1'>[1]</a>：NPR：[Most Beautiful Woman' By Day, Inventor By Night](https://www.npr.org/2011/11/27/142664182/most-beautiful-woman-by-day-inventor-by-night)\n",
    "[Hedy Lamarr](https://en.wikipedia.org/wiki/Hedy_Lamarr)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "004f48a4-3e0e-4862-a975-39b003afef25",
   "metadata": {},
   "source": [
    "### [善用搜索](../Part.3.G.the-golden-age-and-google.ipynb)\n",
    "```bash\n",
    "自学的素养 ::= 有事先问 Google | 学会提问\n",
    "```\n",
    "\n",
    "> - [How to use google effectively](https://www.google.com/search?q=How+to+use+google+effectively)\n",
    "> - [lifehack.com 上的这篇文章](https://www.lifehack.org/articles/technology/20-tips-use-google-search-efficiently.html)\n",
    "> - [我写过的一本 “书”，发布在网上](https://github.com/xiaolai/ji)\n",
    "> - Google Search 的官方文档在这里：https://support.google.com/websearch\n",
    "> - Google Custom Search：https://support.google.com/customsearch/\n",
    "> - 编程优先问\n",
    ">> - [Stackoverflow](https://stackoverflow.com)\n",
    ">> - [Google](https://google.com)、[Stackoverflow](https://stackoverflow.com)、[Wikipedia](https://en.wikipedia.org)、[Youtube](https://youtube.com)，这些都是你经常要去搜索的好地方。\n",
    "> - https://colab.research.google.com/\n",
    "> - 自学者的素养：[How To Ask Questions The Smart Way](https://github.com/selfteaching/How-To-Ask-Questions-The-Smart-Way)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b63f306d-f7fb-4a4c-b0fd-e26ddea1b0fc",
   "metadata": {},
   "source": [
    "### [注意力漂移](../Part.3.H.prevent-focus-drifting.ipynb)\n",
    "```bash\n",
    "本章概述 ::= (注意力漂移 | 全面)\n",
    "...\n",
    "注意力漂移 ::= (现象 | 解决方案)\n",
    "现象 ::= 思想脱离原本关注的事情，而将时间投入到无关的事情中。\n",
    "解决方案 ::= 关注'全面' {把 '全面完整' 放到最高优先级。{重点 --> 全面}}\n",
    "..\n",
    "全面解决的问题 ::= {关注重点 | 剔除完美主义}\n",
    "他的做法 ::= {纸质笔记本}除了这上面罗列的这些东西之外，在当前时间段，别的都不如它们重要。\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ca95ae8e-8849-46b8-b42b-968d13d88e24",
   "metadata": {},
   "source": [
    "### [成为优秀的沟通者](../Q.good-communication.ipynb)\n",
    "```bash\n",
    "本章概述 ::= 优秀的沟通者(入门 | 进阶 | 高级)\n",
    "...~\n",
    "优秀的沟通者 ::= (`内容第一`){确定自己有值得讲、人家值得听的东西}\n",
    "沟通的要点 ::= {了解对方 | 对方想要的才是重点}{区分听众}\n",
    "...\n",
    "入门 ::= (内容质量 | 内容组织 | 消除歧义)\n",
    "内容质量 ::= ('重点突出' $ '例证生动' $ '消除歧义')`不要讲或写你并不擅长的事`{要讲一定要保证自己做得一定比别人好的}\n",
    "内容组织 ::= <后置重点>[[When 重点]+ {并列 | 递进 | 转折}<层层递进>{'3 是重点数量的极限'}\n",
    "| {区分针对你所谓的重点，对方的已知状态}]\n",
    "消除歧义 ::= 消除一切起歧义(听众的反应源于我){?: 我到底说什么了？居然引来这种反应？！}\n",
    "..\n",
    "进阶 ::= 输送(价值观){你的价值观，就是你认为什么比什么更重要。}\n",
    "高级 ::= <尊重&不断向所有的手艺人学习}\n",
    "..\n",
    "重要的手艺 ::= <讲演能力 & 写作能力>\n",
    "手艺的要领 ::= 精湛与否取决于'重复'的次数。\n",
    "工具使用的技巧 ::= 就是用最朴素的方法使用最好的工具\n",
    "有关简单 ::= 由于某些内心的问题忽视了简单的重要性\n",
    "演讲初期幻觉 ::= 感觉总是需要为自己塑造权威感 —— 否则就害怕没人听、没人看、没人信……\n",
    "分享的好处 ::= 分享多了，就自然进步了……\n",
    "```\n",
    "> - …… 作为一个有素养的自学者，有一篇文章必须精读：[How To Ask Questions The Smart Way](https://github.com/selfteaching/How-To-Ask-Questions-The-Smart-Way)\n",
    "> -  这里还有 John Gordon（王渊源）同学录制的英文朗读版: https://github.com/selfteaching/How-To-Ask-Questions-The-Smart-Way\n",
    "> - 《把时间当作朋友》的价值观：能管理好自己的时间的人，学英语学起来更容易……\n",
    "> - 加州伯克利大学的 Brian Harvey 在课堂上告诉学生，“为什么不要作弊” 的真正原因：https://www.youtube.com/embed/hMloyp6NI4E?\n",
    "> - 互联网上我最喜爱的老师，是麻省理工大学的 Walter Lewin 教授；https://www.youtube.com/embed/sJG-rXBbmCc?\n",
    "> - MIT 出了一套 Open Course"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "32872a14-5e87-4d68-ae68-8e2d5a54c3c6",
   "metadata": {},
   "source": [
    "### [自学者的终点](../R.finale.ipynb)\n",
    "```bash\n",
    "情况 ::= 必须学会一个没人教、没人带，甚至没有书可参考的技能。{有效时间投入}\n",
    "解决方案 ::= (谁能持续研究谁就更可能先成为专家 | 刻意思考)\n",
    "```\n",
    "终点\n",
    "-----------\n",
    "> * 你一定要想办法启动自学，否则你没有未来；\n",
    "> * 你把自学当作一门手艺，长期反复磨练它；\n",
    "> * 你懂得学、练、用、造各个阶段之间的不同，以及针对每个阶段的对应策略；\n",
    "> * 面对 “过早引用” 过多的世界，你有你的应对方式；\n",
    "> * 你会 “囫囵吞枣”，你会 “重复重复再重复”，你深刻理解 “读书百遍其义自见”；\n",
    "> * 以后你最擅长的技能之一就是拆解拆解再拆解；\n",
    "> * 你用你的拆解手艺把所有遇到的难点都拆解成能搞定的小任务；\n",
    "> * 自学任何一门手艺之前你都不会去问 “有什么用”，而是清楚地知道，无论是什么只要学会了就只能也必然天天去用；\n",
    "> * 你没有刚需幻觉，你也没有时间幻觉，你更没有困难幻觉，反正你就是相对更清醒；\n",
    "> * 不管你新学什么手艺，你都知道只要假以时日你就肯定能做好，因为所有的手艺精湛，靠的只不过是充足的预算；\n",
    "> * 你知道如何不浪费生命，因为只要不是在刻意练习、不是在刻意思考，那就是在 “混时间”；\n",
    "> * 你总是在琢磨你能做个什么新作品；\n",
    "> * 你刻意地使用你的作品作为有效社交工具，也用作品去过滤无效社交；\n",
    "> * 你乐于分享，乐于阅读也更乐于写作 —— 因为这世界怎么帮助你的，你就想着要怎样回报；\n",
    "> * 你把全面和完整当作最高衡量标准，也用这个标准去克制、应对自己的注意力漂移；\n",
    "> * 你会不断自学新的手艺，因为你越来越理解单一技能的脆弱，越来越理解多项技能的综合威力；\n",
    "> * 你越来越依赖互联网，它是你最喜欢的 “书”，而 Google 是你最好的朋友 —— 他总是能帮你找到更好的老师；\n",
    "> * 偶尔，你会学会没人教、没人带、甚至没书可参考的手艺，别人都说你 “悟性” 高，可你自己清楚地知道那其实是怎么回事；\n",
    "> * 你越来越明白，其实没什么 “秘密”，越简单、越朴素的道理越值得重视；\n",
    "> * 你发现你用来思考的时间越来越多 —— 准确地讲，是 “琢磨”…… 只不过是因为你真会琢磨了 —— 你很清楚你应该花时间琢磨的是什么。\n",
    "------\n",
    "> - 这里是[《比特币白皮书》我翻译的版本](https://github.com/xiaolai/bitcoin-whitepaper-chinese-translation)。\n",
    "> - Andreas M. Antonopoulos：《精通比特币》（[Mastering Bitcoin](https://www.amazon.com/Mastering-Bitcoin-Programming-Open-Blockchain/dp/1491954388/)）"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e6dd6940-b4ed-474f-a1a2-c2db202ffbaf",
   "metadata": {},
   "source": [
    " ### [下一步](../S.whats-next.ipynb)\n",
    " ```bash\n",
    " 本章概述 ::= 这一章建议看原文\n",
    " ```"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "664d3523-cd7b-4737-bc0a-c029c5cf58ab",
   "metadata": {
    "tags": []
   },
   "source": [
    "## 第二部分\n",
    "### 学习目的\n",
    "\n",
    "1. 了解编程语言通用结构"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "55a0dc65-2b43-43a2-b85b-df19cecbffb2",
   "metadata": {},
   "source": [
    "### [开始前的准备](../Part.1.D.preparation.for.reading.ipynb)\n",
    "\n",
    "```sh\n",
    "内容概要 ::= (布尔 | 值&类型&运算符 | 流程控制 | 函数 | 字符串 | 容器 | 文件操作)\n",
    "阅读策略 ::= (脱盲 | 反复)\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f02ec854-dfda-4178-8d81-bd8a0c7b5d5d",
   "metadata": {
    "tags": []
   },
   "source": [
    "### [值及其相应的运算](../Part.1.E.2.values-and-their-operators.ipynb)\n",
    "\n",
    "```shell\n",
    "本章 ::= ( 值 | 数据类型 | 运算符 | 容器)\n",
    "...~\n",
    "程序 ::= < 运算(Evaluation) & 流程控制(Control Flow) >\n",
    "...\n",
    "值 ::= ( 常量 | 变量 )\n",
    "常量 ::= 本身就是值\n",
    "变量 ::= 需要先赋值\n",
    "... \n",
    "基础数据类型 ::= ( 数字(Numbers) | 字符串(Strings) | 布尔(Boolean Value) )(...)\n",
    "\n",
    "数字 ::= ( 整数(Int)| 浮点数(Float) | 复数(Complex Numbers) )\n",
    "...\n",
    "容器(Container) ::=-( `字符串` | `列表` | `元组` | `字典` ){有序容器}\n",
    "\n",
    "字符串 ::= { 'asdfg' }\n",
    "列表 ::= { [1,2,3,4] }\n",
    "元组 ::= { (1,2,3,4) }{不可修改}\n",
    "字典 ::= { {1:2,2:3} }\n",
    "...\n",
    "运算操作符 ::= ( 类型 | 优先级 )\n",
    "\n",
    "数字操作符 ::= ( `加` `+` | `减` `-` | `乘` `*` | `除` `/` | `商` `//` | `余` `%` | `幂` `**`)\n",
    "优先级 ::= ( `**` >> `+`{正} `-`{负} >> `//` `%` >> `*` `/` >> `+` `-` )\n",
    "\n",
    "字符串操作符 ::= ( `拼接` `+` or ` `{空格} | `复制` `*` )\n",
    "优先级 ::= ( `*` >> `+` ` `{空格} )\n",
    "\n",
    "字符串逻辑操作符 ::= ( `属于` `in` | `不属于` `not in` )\n",
    "\n",
    "布尔运操作符 ::= ( `或` `or` | `且` `and` | `非` `not` )\n",
    "优先级 ::= ( `not` >> `and` >> `or` )\n",
    "--\n",
    "优先级 ::= ( `数字` >> `字符串` >> `布尔` )\n",
    "...\n",
    "函数 ::= 解决问题的步骤集合\n",
    "...\n",
    "复杂运算 ::= { built-in function }\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f08a2461-3590-4f1e-9a20-7adb7c445a61",
   "metadata": {
    "tags": []
   },
   "source": [
    "\n",
    "#### 文章连接参考\n",
    "> * python优先级：https://docs.python.org/3/reference/expressions.html#operator-precedence\n",
    "> * python内建函数(built-in function)：https://docs.python.org/3/library/functions.html\n",
    "> * 关于表达式：https://docs.python.org/3/reference/expressions.html\n",
    "> * 关于所有操作的优先级：https://docs.python.org/3/reference/expressions.html#operator-precedence\n",
    "> * 上一条链接不懂 BNF 的话根本读不懂：https://en.wikipedia.org/wiki/Backus-Naur_form\n",
    "> * Python 的内建函数：https://docs.python.org/3/library/functions.html\n",
    "> * Python 的标准数据类型：https://docs.python.org/3/library/stdtypes.html\n",
    "> * Python 内构介绍：https://docs.python.org/3.7/library/operator.html"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "63625d7a-638c-4102-bb3f-43d3a2a78605",
   "metadata": {},
   "source": [
    "### [流程控制](../Part.1.E.3.controlflow.ipynb)\n",
    "```bash\n",
    "流程控制 ::= (判断 | 循环 )\n",
    "...~\n",
    "判断 ::= (`if` | `elif` | `else`)\n",
    "...\n",
    "循环 ::= (类型 | 关键词)\n",
    ".\n",
    "类型 ::= (集合循环 | 条件循环 | WTU) {wtu:何时使用}\n",
    "集合循环 ::= <`for循环`> 以一个集合为基础的循环 {`for i in range(n)`}\n",
    "条件循环 ::= <`while循环`> 以一个条件为基础的循环 {`while i < n`}\n",
    "wtu ::= \n",
    "...\n",
    "关键词 ::= (`break` | `continue` | `pass`)\n",
    "break ::= 跳出当前循环\n",
    "continue ::= 挑出当前循环继续下一个循环\n",
    "pass ::= 无 {可以用来个循环体占位用}\n",
    "```\n",
    "> - [range()官方说明](https://docs.python.org/3/library/functions.html#func-range)\n",
    "> - Flow diagrams, turing machines and languages with only two formation rules by Böhm and Jacopini (1966)\n",
    "> - [Wikipedia: Minimal structured control flow](https://en.wikipedia.org/wiki/Control_flow#Goto)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8abd21d0-f002-484a-a541-7ca1f0889bad",
   "metadata": {},
   "source": [
    "### [文件](../Part.1.E.7.files.ipynb)\n",
    "\n",
    "```bash\n",
    "章节梗概 ::= (文件 | 单词值项目)\n",
    "...\n",
    "文件 ::= (操作 | `with语句`)\n",
    ".\n",
    "操作 ::= (打开 | 关闭 | 创建 | 删除 | 修改 | 查询)\n",
    "..\n",
    "打开&修改 ::= (关键词 & 参数 | 读取) {open('/text.txt','w')}\n",
    "关键词 ::= (`a` | `r` | `w` | `+` | `t` | `b` | `x`)\n",
    "a ::= 追加模式--在已有文档后追加内容\n",
    "r ::= 只读模式\n",
    "w ::= 修改模式\n",
    "+ ::= 读写模式\n",
    "t ::= 文本文件模式\n",
    "b ::= 二进制文件模式\n",
    "x ::= 排他模式--如果存在文件，那么打开失败\n",
    ".\n",
    "读取 ::= (`readline()` | `readlines()`)\n",
    "readline ::= 返回一行 { 多行文本，重复执行一次返回 }\n",
    "readlines ::= 返回将文件每行作为值的列表\n",
    "..\n",
    "关闭 ::= {`file.close()`}\n",
    "删除 ::= {`os.remove(file.name)`}\n",
    "...\n",
    "with语句 ::= `with open(...) as \\ f: f.write(...) \\ ...`\n",
    "```\n",
    "\n",
    "> - [python.org: os模块](https://docs.python.org/3/library/os.html)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "680d3fe3-7d93-4654-bb70-8717cdd86c5f",
   "metadata": {
    "scrolled": true,
    "tags": []
   },
   "outputs": [],
   "source": [
    "# 取出字母和值为一百的数\n",
    "def sum_of_word(word):\n",
    "    sum = 0\n",
    "    for order in word:\n",
    "        sum += ord(order)-96\n",
    "    return sum\n",
    "    \n",
    "# import os\n",
    "# print(ord('a')-96)\n",
    "with open('words_alpha.txt','r') as f:\n",
    "    # print(len(f.readlines())) # 看看长度\n",
    "    for i in f.readlines():\n",
    "        if sum_of_word(i.strip()) != 100:\n",
    "            continue\n",
    "        print(f'{i.strip()} {sum_of_word(i.strip())}')\n",
    "    "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "34016a2a-e4e7-4083-a3dc-7b137eb1a5d3",
   "metadata": {},
   "source": [
    "### [官方教程导读](../Part.1.G.The-Python-Tutorial-local.ipynb)\n",
    "\n",
    "```bash\n",
    "本章概要 ::= (官方文档 & 转换)\n",
    "...\n",
    "官方文档 ::= `第一查询对象只能是官方文档。`\n",
    "转换 ::= 见该章的其余部分\n",
    "\n",
    "```\n",
    "> - 官方教程：[The Python Tutorial](https://docs.python.org/3/tutorial/index.html)\n",
    "> - [文档规范](https://devguide.python.org/documenting/) —— [Sphinx](http://www.sphinx-doc.org/en/master/)\n",
    "> - 计算机文档综合: [Read the Docs](https://readthedocs.org)\n",
    "> - 初学者最重要的两个文档\n",
    ">> * **[Tutorial](https://docs.python.org/3/tutorial/index.html)**: https://docs.python.org/3/tutorial/index.html\n",
    ">> * **[Library Reference](https://docs.python.org/3/library/index.html)**: https://docs.python.org/3/library/index.html\n",
    "> - Guido van Rossum的[个人主页](https://gvanrossum.github.io)\n",
    "> - 著名的 Python 教程《[Think Python: How to Think Like a Computer Scientist](http://greenteapress.com/thinkpython2/html/index.html)》、《[Dive into Python](https://linux.die.net/diveintopython/html/toc/index.html)》\n",
    "> - 下载源文件\n",
    ">> - The Python Tutorial 的源文件位置在：https://github.com/python/cpython/tree/master/Doc/tutorial\n",
    ">> - repo 地址是：https://github.com/python/cpython.git\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b99f12d4-b40e-4181-bc69-1fa65b5c94a9",
   "metadata": {},
   "source": [
    "### [编程的写作能力](../Part.2.C.why-start-from-writing-functions.ipynb)\n",
    "```bash\n",
    "本章概要 ::= (阅读 & 写作 | 函数的要求 | 工程基础 | 阅读建议)\n",
    "...\n",
    "阅读 ::= <阅读>* --> <写作> {}\n",
    "函数的要求 ::= {`完成一个功能` | `只完成一个功能` | `没有任何错误地只完成一个功能`}\n",
    "工程基础 ::= {\n",
    "`参数的传递`\n",
    "| `多参数的传递`\n",
    "| `匿名函数 & 函数的别称`\n",
    "| `递归函数`\n",
    "| `函数文档`\n",
    "| `模块`\n",
    "| `测试驱动编程`\n",
    "| `可执行程序`}\n",
    "\n",
    "阅读建议 ::= (`每章独立总结` | `第二部分的总结` | `函数的总结`)\n",
    "```\n",
    "> 读不懂没关系 --> 标记下来 --> 带着问题学习\n",
    "> - python的开源：https://github.com/python/\n",
    "> - python 的 demo：https://github.com/python/cpython/tree/master/Tools/demo\n",
    "> - 至少读一读这些程序\n",
    ">> * [beer.py](https://github.com/python/cpython/blob/master/Tools/demo/beer.py)        Well-known programming example: Bottles of beer.\n",
    ">> * [eiffel.py](https://github.com/python/cpython/blob/master/Tools/demo/eiffel.py)      Python advanced magic: A metaclass for Eiffel post/preconditions.\n",
    ">> * [hanoi.py](https://github.com/python/cpython/blob/master/Tools/demo/hanoi.py)       Well-known programming example: Towers of Hanoi.\n",
    ">> * [life.py](https://github.com/python/cpython/blob/master/Tools/demo/life.py)        Curses programming: Simple game-of-life.\n",
    ">> * [markov.py](https://github.com/python/cpython/blob/master/Tools/demo/markov.py)      Algorithms: Markov chain simulation.\n",
    ">> * [queens.py](https://github.com/python/cpython/blob/master/Tools/demo/queens.py)      Well-known programming example: N-Queens problem."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2a4c5d90-7669-4761-bb5a-8b26cbae80ed",
   "metadata": {},
   "source": [
    "## 第三部分\n",
    "### 阅读的目的\n",
    "1. 理解工程构建路径"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "dba90481-7264-4550-9433-3b26b08347f5",
   "metadata": {},
   "source": [
    "### [有关参数-上](../Part.2.D.1-args.ipynb)\n",
    "```bash\n",
    "本章概述 ::= (函数 | 变量)\n",
    "...\n",
    "函数 ::= (命名规则 | 关键词)\n",
    "命名规则 ::= 驼峰命名法(Camel Case){https://en.wikipedia.org/wiki/Camel_case}\n",
    "关键词 ::= [参数 | return]*\n",
    "...\n",
    "变量 ::= (全局变量 | 局部变量) {注意含有可变容器的函数}\n",
    "```\n",
    "\n",
    "> - 命名的规则\n",
    ">> * [PEP 8 -- Style Guide for Python Code: Naming Conventions](https://www.python.org/dev/peps/pep-0008/#naming-conventions)\n",
    ">> * [PEP 526 -- Syntax for Variable Annotations](https://www.python.org/dev/peps/pep-0526/)\n",
    ">>\n",
    ">> 注：PEPs，是 Python Enhancement Proposals 的缩写：https://www.python.org/dev/peps/\n",
    "\n",
    "### [有关参数-下](../Part.2.D.2-aargs.ipynb)\n",
    "```bash\n",
    "本章概述 ::= (参数 | 顺序)\n",
    "...\n",
    "参数 ::= {类型 --> 定义}\n",
    "类型 ::= (*定位 | **可选)\n",
    "positional --> 'Argument' \n",
    "arbitrary positional --> '*Argument' {类似列表 | 建议复数命名}\n",
    "keyword --> 'Argument=\"dafault\"' {可选参数}\n",
    "arbitrary keyword --> '**Argument' {类似字典 | 建议复数命名}\n",
    "...\n",
    "顺序 ::= (定位 >> 任意定位 >> 关键字 >> 任意关键字)\n",
    "顺序 ::= (a, *b, c='default', **d)\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9702b9c7-b19a-4c67-b092-03990f3017cd",
   "metadata": {},
   "source": [
    "### [化名&匿名](../Part.2.D.3-lambda.ipynb)\n",
    "```bash\n",
    "本章概述 ::= (函数识别 | `化名` | `Lambda`)\n",
    "...\n",
    "函数识别 ::= (作用 | 关键字)\n",
    "作用 ::= 判断函数是否相同，或是其类别。\n",
    "关键字 ::= (`id()`{存储地址} | `type` | `f`{函数名，直接输出函数类别})\n",
    "...\n",
    "化名 ::= (定义 | 用途)\n",
    "定义 ::= `f = function()`\n",
    "用途 ::= {在工程中建议给函数一个完整的名字，为方便可在之后取用一个**化名**}\n",
    "...\n",
    "Lambda ::= (定义 | 用途)\n",
    "定义 ::= <简短函数> { lambda_expr ::= \"lambda\" [parameter_list] \":\" expression } --> {f = lambda x: x+1}\n",
    "用途 ::= {替代'用过即废'的方法 | 作为参数{如,map(function, iterable, ...)}}\n",
    "```\n",
    "\n",
    "> - 案例: [The Python Tutorial：lambda-expressions](https://docs.python.org/3/tutorial/controlflow.html#lambda-expressions)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ba848053-bd50-4311-9482-eb2251de6548",
   "metadata": {},
   "source": [
    "### [递归函数](../Part.2.D.4-recursion.ipynb)\n",
    "\n",
    "```bash \n",
    "本章概述 ::= (递归函数 | 变量作用域 | 编程哲学)\n",
    "...\n",
    "递归函数 ::= (定义 | 原则) {'它不是某个语言的特例，只是一种思考的产物'}\n",
    "定义 ::= 在自身函数中调用自身函数 \n",
    "原则 ::= (`1.调用自身函数 -- 2.逐步达成 --> 3.终止条件`) {'逐步区别于总能达成'}\n",
    "...\n",
    "编程哲学 ::= {'在函数内部绝对不调用全局变量。即便是必须改变全局变量，也只能通过函数的返回值在函数外改变全局变量。'}\n",
    "--> {`做事的原则：自己的事自己做，别人的事，最多通过自己的产出让他们自己去搞……`}\n",
    "\n",
    "```\n",
    "\n",
    "> - [True False 比较写法: Boolean identity == True vs is True](https://stackoverflow.com/questions/27276610/boolean-identity-true-vs-is-true)\n",
    "> - [PEP8：True False 比较写法](https://www.python.org/dev/peps/pep-0008/)\n",
    "> - [阿西莫夫三铁律](https://zh.wikipedia.org/wiki/%E6%9C%BA%E5%99%A8%E4%BA%BA%E4%B8%89%E5%AE%9A%E5%BE%8B)\n",
    "> - [普林斯顿大学的递归例子](https://introcs.cs.princeton.edu/java/23recursion/)\n",
    "> - [著名的 Python 教程：Think Python: How to Think Like a Computer Scientist](http://greenteapress.com/thinkpython2/html/index.html)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "26232d6c-d865-4df9-9faa-b8e3f9f5b316",
   "metadata": {},
   "source": [
    "### [函数说明书](../Part.2.D.5-docstrings.ipynb)\n",
    "\n",
    "```bash\n",
    "本章概述 ::= (函数说明 | 使用方式)\n",
    "...\n",
    "函数说明(`Docstring`) ::= (规范 | 使用方式 | 书写哲学)\n",
    "规范 ::= (\n",
    "`位置: 函数的起始`{首尾没有空行}\n",
    "| `符号：由三个双引号括起`\n",
    "| `结构：首行概述`\n",
    "| `内容：参数、返回值、可能触发的错误类型、可能的副作用，以及函数的使用限制`(...)\n",
    ")\n",
    "...\n",
    "使用方式 ::= (`.__doc__` | `help()`)\n",
    "书写哲学 ::= {'说明是写给人看的，写 Why 要远比写 What 更重要'}\n",
    "```\n",
    "> - 关于 Class 的 Docstring\n",
    ">> * [PEP 257: Docstring Convensions](https://www.python.org/dev/peps/pep-0257/)\n",
    ">> * [PEP 258: Docutils Design Specification](https://www.python.org/dev/peps/pep-0258/)\n",
    "> - 关于 [Sphinx](http://www.sphinx-doc.org) 工具\n",
    ">> * [sphinx.ext.napoleon – Support for NumPy and Google style docstrings](http://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html)\n",
    ">> * [sphinx.ext.autodoc – Include documentation from docstrings](https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "59868b1f-f1ac-4b38-8bb2-64ac1787aa57",
   "metadata": {
    "tags": []
   },
   "source": [
    "### [模块](../Part.2.D.6-modules.ipynb)\n",
    "\n",
    "```python\n",
    "本章概要 ::= (模块 | 包 | 关键词){dir()}\n",
    "...~\n",
    "模块 ::= (引入[特定函数] | 调用) {模块是个`文件`} \n",
    "> {'模块'是被包装好的函数集合，'其他可执行代码只会执行一次' {'模块'* --> '包'}} \n",
    "引入[特定函数] ::= [ from module_name ] import [module_name | funciton_name] \n",
    "调用 ::= module.function_name [function_name] [as alias]\n",
    "...\n",
    "包 ::= (定义 | 使用) {包是一个`文件夹`}\n",
    "定义 ::= {模块的集合 {Python 中是个含有 '__init__.py' 的`文件夹`}}\n",
    "使用 ::= import package.module\n",
    "...\n",
    "检索顺序 ::= (内置函数 --> sys.path 目录)\n",
    "...\n",
    "关键词 ::= ( 内建函数 | [指定]目录列表 | 化名 | dir() | ){sys 模块}\n",
    "内建函数名 ::= sys.builtin_module_names\n",
    "指定目录列表 ::= sys.path.append(path_link)\n",
    "化名 ::= ('=' | 'as')\n",
    "dir ::= '查看模块中可触达的变量名称和函数名称'\n",
    "```\n",
    "\n",
    "> - 包：[packages](https://docs.python.org/3/reference/import.html#regular-packages)\n",
    "> - 命名空间：[namespace](https://docs.python.org/3/glossary.html#term-namespace-package)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bafd3ca7-a536-48fa-9d4d-328204e3c9d0",
   "metadata": {},
   "source": [
    "### [测试驱动开发](../Part.2.D.7-tdd.ipynb)\n",
    "```bash\n",
    "本章概述 ::= (开发流程 | 测试语句 | 错误类型) {'Test Driven Development'}\n",
    "...\n",
    "开发流程 ::= 设定测试语句 --> 逐步开发\n",
    "测试语句 ::= (`\n",
    "try: ...\n",
    "except ... as ... :\n",
    "else: ...\n",
    "finally: ...\n",
    "`)\n",
    "错误类型 ::= (`语法错误（Syntax Errors）` & `意外（Exceptions）`)\n",
    "```\n",
    "\n",
    "> 错误文档: https://docs.python.org/3/library/exceptions.html\n",
    "> - 错误处理的内容\n",
    ">> * [Errors and Exceptions](docs.python.org/3/tutorial/errors.html)\n",
    ">> * [Built-in Exceptions](https://docs.python.org/3/library/exceptions.html)\n",
    ">> * [Handling Exceptions](https://wiki.python.org/moin/HandlingExceptions)\n",
    "> - 真测试驱动开发:[unittest](https://docs.python.org/3/library/unittest.html)\n",
    "> - 读完整本书之后回来看\n",
    ">> * [doctest —— Test interactive Python examples](https://docs.python.org/3/library/doctest.html)\n",
    ">> * [unittest —— Unit testing framework](https://docs.python.org/3/library/unittest.html)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e68faa06-6797-4c23-bb8f-34893916ea77",
   "metadata": {},
   "source": [
    "### [可执行的Python文件](../Part.2.D.8-main.ipynb)\n",
    "```bash\n",
    "本章概述 ::= (结构 | 执行)\n",
    "结构 ::= (#!/usr/bin/env python) {加入这句后可以传递参数了}\n",
    "执行 ::= {python [-m] name.py [ | name] [argument]*}\n",
    "```\n",
    "> - #!/usr/bin/env python\n",
    ">> - [`python3 script executable`](https://www.google.com/search?q=python3+script+executable)\n",
    ">> - [`python3 script executable parameters retrieving`](https://www.google.com/search?q=python3+script+executable+parameters+retrieving)\n",
    "> - Python 的操作符优先级，完整表格在这里：[Operator precedence](https://docs.python.org/3/reference/expressions.html#operator-precedence)\n",
    "> - Python 的更多彩蛋：[Python Easter Eggs](https://github.com/OrkoHunter/python-easter-eggs)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b120e1b4-ad68-4668-8724-946eea2bb53f",
   "metadata": {},
   "source": [
    "### [类——面向对象](../Part.3.B.1.classes-1.ipynb)\n",
    "```bash\n",
    "本文概述 ::= (基本术语)\n",
    "面向对象术语 ::= (\n",
    "`对象` | `封装` | `抽象` \n",
    "| `界面` | `属性` | `方法`\n",
    "| `继承` | `子类` | `类` | `实例`\n",
    ")\n",
    "\n",
    "对象(Object) ::= 使用者对'实例'的称呼\n",
    "封装(Encapsulate) ::= 打包加密'类'的过程\n",
    "抽象(Abstract) ::= 对'实例'的可用特征的归纳\n",
    "界面(Interface) ::= '封装'的结果\n",
    "属性(Attributes) ::= '类'的必要特征\n",
    "方法(Methods) ::= '类'必要的运算过程\n",
    "继承(Inheritance) ::= 生成'子类'的方法\n",
    "子类(Subclass) ::= '类'和'实例'之间的过渡'类'\n",
    "类(Class) ::= '实例'的特征'抽象'\n",
    "实例(Instances) ::= '类的实例化结果'\n",
    "...\n",
    "```\n",
    "```c++\n",
    "对象 | 实例 --> 类 --> 界面\n",
    "子类 --> 类 --> 实例\n",
    "\n",
    "抽象-继承-封装-实例化\n",
    "...\n",
    "[对象 | 实例] --抽象--> 类 --封装--> 界面\n",
    "子类 --继承--> 类\n",
    "类(属性+方法) --封装--> 界面\n",
    "类 --实例化--> 实例\n",
    "```\n",
    "\n",
    "> - 面向对象编程:[Object Oriented Programming, OOP](https://en.wikipedia.org/wiki/Object-oriented_programming)\n",
    "> - 反对面向对象\n",
    ">> - Erlang 的发明者:[Joe Armstrong](https://en.wikipedia.org/wiki/Joe_Armstrong_(programmer) 以及[他的文章](http://www.codersatwork.com)\n",
    ">> - 创作 UTF-8 和 Golang 的程序员 [Rob Pike](https://en.wikipedia.org/wiki/Rob_Pike) \n",
    "以及他的比喻[Roman numerals of computing](https://groups.google.com/forum/#!topic/comp.os.plan9/VUUznNK2t4Q%5B151-175%5D)\n",
    "还有一篇:[挖坟把一个 Java 教授写的 OOP 文章嘲弄了一番](https://plus.google.com/+RobPikeTheHuman/posts/hoJdanihKwb)\n",
    ">> - Y-Combinator 的创始人[Paul Graham](https://en.wikipedia.org/wiki/Paul_Graham_(programmer)\n",
    "他的文章：[Why Arc isn't Especially Object-Oriented](http://www.paulgraham.com/noop.html)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6908888d-c30f-4ace-bf02-3116f7e4dc08",
   "metadata": {},
   "source": [
    "### [类 —— Python 的实现](../Part.3.B.2.classes-2.ipynb)\n",
    "\n",
    "```bash \n",
    "本章概述 ::= (Defining Class | Inheritance | Overrides | Encapsulation | Inspceting class | Scope | 关键词)\n",
    "...~\n",
    "Defining Class ::= ('class' | '__init__()')\n",
    "Inheritance ::= (继承 | 'class_name(parent)')\n",
    "继承 ::= 继承'父类'所有非私有'属性'和'方法'\n",
    "Overrides ::= 子类可以重写父类的可继承方法\n",
    "Encapsulation ::= <私有化访问>('@property' | '@population' | '__')\n",
    "@property ::= 特征化 {可以通过方法名进行方法访问，但是不能传递参数}\n",
    "...\n",
    "Inspceting class ::= (help() | dir())(n...)\n",
    "...\n",
    "Scope ::= (function | 变量类型)\n",
    "function ::= [hasattr | getattr | setattr](object, attr, [value])\n",
    "变量类型 ::= (类变量 | 实例变量 | 成员变量)\n",
    "...\n",
    "关键词 ::= (self | class | class_name() | __init__() )\n",
    "self ::= 指向'实例'\n",
    "class ::= 声明'类'\n",
    "class_n() ::= () <-- 括号中声明'父类'\n",
    "__init__() ::= 初始化方法 {__init__.py 声明'模块包'}\n",
    "```\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8cb190fa-16e5-4c14-b805-a8b328b1900d",
   "metadata": {
    "tags": []
   },
   "source": [
    "### [函数工具](../Part.3.B.3.decorator-iterator-generator.ipynb)\n",
    "```bash\n",
    "本章概述 ::= (迭代器 | 生成器 | 装饰器)\n",
    "...\n",
    "迭代器 ::= (内嵌函数 | 关键词 ){使用多次使用next依次输出}\n",
    "关键词 ::= (iter() | next | raise | __iter__ | __next__)\n",
    "raise ::= raise StopIteration {抛出异常}\n",
    "..\n",
    "生成器 ::= (表达式 | 关键词)\n",
    "关键词 ::= (yield)\n",
    "表达式 ::= ['(' | '[' | '{'] a for a range(n) if a % 2 != 0 ['}' | ']' | ')']{\n",
    "'(' : 生成器\n",
    "'[' : 列表\n",
    "'{' : 字典\n",
    "}\n",
    "..\n",
    "装饰器 ::= <'@function_name'>{该声明下方法会被当做参数传入function_name方法的内嵌方法中} \n",
    "```\n",
    "> - **生成器表达式必须在括号内使用**（参见官方 [HOWTOS](https://docs.python.org/3/howto/functional.html#generator-expressions-and-list-comprehensions)）\n",
    "> - 装饰器 :https://wiki.python.org/moin/PythonDecoratorLibrary\n",
    "> - Oreilly.com 上有篇文章，《5 reasons you need to learn to write Python decorators》"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "86a107b2-a750-4c6f-b1c7-39a2833f82ac",
   "metadata": {},
   "source": [
    "### [正则表达式](../Part.3.B.4.regex.ipynb)\n",
    "```bash\n",
    "本章概要 ::= (基础 | 原子 | 操作){这章的复习建议参考原文}\n",
    "...\n",
    "关键词 ::= (`re` | `compile`)\n",
    "保留符 ::= -( \\ + * . ? - ^ $ | ( ) [ ] { } < > )-\n",
    "Regex ::= {`作用：'搜索'文档通过'规则'将符合的内容'捕获'进行'检查'或'修改'操作`}\n",
    "优先级 ::= 转义字符 >> 分组&捕获 >> 数量 >> 序列&定位 >> 或 >> 原子\n",
    "::= (`原子` | )\n",
    "...\n",
    "原子 ::= (本义字符 | 集合原子 | 类别原子 | 边缘原子 | 组合原子)\n",
    "类别原子 ::= -[ \\d \\D \\s \\S \\w \\W . \\f \\n \\r \\t \\v ]-\n",
    "\\f ::= 分页符\n",
    "\\v ::= 纵向制表符\n",
    "边缘原子 ::= -[ \\A{^} \\Z{$} \\b \\B ]-\n",
    "\\b ::= 结尾{er\\b - er结尾}\n",
    "数量操作符 ::= -( + ? * `{n, m}` )-\n",
    "...\n",
    "捕获 ::= (`sub()` | `\\1-n`)\n",
    "非捕获匹配 ::= (`(?:...)`)\n",
    "控制标记 ::=\n",
    "占位符 ::= [ %[s | d |f] | '{[Null | digial | variable]}'.format()]{`print('Good %s'%'morning')` | `print('good {1}').format('morning')`}\n",
    "...\n",
    "自学哲学 ::= <费曼技巧> {想尽一切办法把一切术语用简单直白的 “人话” 重新表述}\n",
    "```\n",
    "\n",
    "> - 检测Regex的demo：[`redemo.py`](https://github.com/python/cpython/blob/master/Tools/demo/redemo.py)\n",
    ">> - [Tcl/Tk](https://docs.python.org/3/library/tkinter.html)\n",
    ">> - 源码: https://raw.githubusercontent.com/python/cpython/master/Tools/demo/redemo.py\n",
    "> - 在线工具：[regex101.com](https://regex101.com)或[regexper](https://regexper.com/)\n",
    "> - 网页打包工具：[Nativefier](https://github.com/jiahaog/nativefier)\n",
    "> - [1]：释义摘自苹果电脑上系统内建的《牛津英汉双解辞典》 \n",
    "> - [2]：[8 Regular Expressions You Should Know](https://bit.ly/2tz8v9n) by Vasili\n",
    "> - [3]：关于校验密码强度的正则表达式，往往需要设置更为复杂的规则，Stackoverflow 上的一则答复中有很好的示例：https://stackoverflow.com/a/21456918\n",
    "> - [4]：http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html\n",
    "> - [5]：Parry 的源代码（用 Lisp 写的）在这里：http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/areas/classics/parry/\n",
    "> - [6]：ELIZA 和 Parry 的完整聊天记录在这里：https://tools.ietf.org/html/rfc439\n",
    "> - regex:https://docs.python.org/3/library/re.html"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "33a4c22a-ba7a-4eec-a9ab-9dd9097ef046",
   "metadata": {},
   "source": [
    "### [BNF 以及 EBNF](../Part.3.B.5.bnf-ebnf-pebnf.ipynb)\n",
    "\n",
    "> - 上下文无关文法：[Context-free Grammar](https://en.wikipedia.org/wiki/Context-free_grammar)\n",
    "> * Glob：https://en.wikipedia.org/wiki/Glob_(programming)\n",
    "> * Wild_character:https://en.wikipedia.org/wiki/Wildcard_character\n",
    "> - Format-string-syntax：https://docs.python.org/3/library/string.html#format-string-syntax\n",
    "> - <a name='fn1'>[1]</a>：[The Python Language Reference » 1.2 Notation](https://docs.python.org/3/reference/introduction.html#notation) —— 这个链接必须去看一看……\n",
    "> - <a name='fn2'>[2]</a>：[Perl Style Regular Expressions in Prolog](http://www.cs.sfu.ca/~cameron/Teaching/384/99-3/regexp-plg.html) CMPT 384 Lecture Notes\n",
    "Robert D. Cameron November 29 - December 1, 1999\n",
    "> - <a name='fn3'>[3]</a>：很少有人注意到：在很多编程语言的文法文档中，`\"$\"` 被称为 `<eos>` —— 2017 年 5 月我投资了一个初创公司，听说他们的资产名称叫做 `eos`…… 我当场就被这个梗逗乐了。\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "25c771a0-20c1-4db0-934a-3c0351287a66",
   "metadata": {
    "tags": []
   },
   "source": [
    "### @@@\n",
    "\n",
    "```c\n",
    "暂未学会 ::= (OOP | 迭代器 | 生成器 | 装饰器| Regex)\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "06f00cfc-03e6-4469-a5b3-58f3f299b706",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.13"
  },
  "toc-autonumbering": true,
  "toc-showtags": false
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
